package com.example.myproject.web;

import com.example.myproject.domain.User;
import com.example.myproject.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by xi on 2017/7/23.
 *
 */
@RestController
public class MapperController {

    @Autowired
    private UserMapper userMapper;

    @RequestMapping("/mapper/user")

    public List<User> testDruidMapper(ModelMap map) {
        List<User> list = userMapper.selectList();
        return list;
    }

}
